//
//  ViewController.m
//  ZPrograme
//
//  Created by 周成龙 on 16/6/16.
//  Copyright © 2016年 none. All rights reserved.
//

#import "ViewController.h"

#import "BaiduMapHeader.h"
#import "TwoVC.h"

@interface ViewController ()
//<BMKMapViewDelegate>
{
//    BMKMapView* _mapView;
    UIButton *buttn;
}

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.titleLabel.text = @"测试titleLabel";
    
//    _mapView = [[BMKMapView alloc]initWithFrame:CGRectMake(0, 0, 320, 480)];
//    self.view = _mapView;
    
    buttn = [[UIButton alloc] init];
    buttn.frame = CGRectMake(100, 100, 40, 40);
    buttn.backgroundColor = [UIColor redColor];
    [buttn addTarget:self action:@selector(button) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:buttn];
}

- (void)button
{
    TwoVC *vc = [TwoVC new];
    [self.navigationController pushViewController:vc animated:YES];
}

- (void)viewWillAppear:(BOOL)animated
{
//    [_mapView viewWillAppear];
//    _mapView.delegate = self; // 此处记得不用的时候需要置nil，否则影响内存的释放
}
-(void)viewWillDisappear:(BOOL)animated
{
//    [_mapView viewWillDisappear];
//    _mapView.delegate = nil; // 不用时，置nil
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
